const controller = getAjaxBaseUrl('/quotaPoint', '/energy')

/** 查询用能单元碳配额信息 */
export function queryQuotaInfoOfPoint(
  pointId: number,
  year: number,
) {
  return get<{
    id: number
    pointId: number
    year: number
    quantity: number
  }>(`${controller}/info`, { pointId, year })
}

/** 保存用能单元碳配额信息 */
export function saveQuotaInfoOfPoint(
  params: {
    pointId: number
    year: number
    quantity: number
  },
) {
  return get(`${controller}/save`, params)
}
